/*
* Conditions Of Use
*
* This software was developed by employees of the Sigmatrix(Beijing) Corporation.
* This software is provided by sigmatrix as a service and is expressly
* provided "AS IS."  Sigmatrix MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY.  Sigmatrix does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
* Permission to use this software is contingent upon your acceptance
* of the terms of this agreement.
*
*/
package com.sigmatrix.h5.service;

import com.sigmatrix.h5.entity.DisRebateActivity;
import com.sigmatrix.h5.web.mode.RebateActivityInfo;
import com.sigmatrix.sc.jdbc.common.service.Service;

/**
 *@ClassName: DisRebateActivityService
 *@Description: 
 *@author MH
 *@date 2017年8月15日 下午5:27:53
 */
public interface DisRebateActivityService extends Service<DisRebateActivity,Integer>{
	
	/**
	 * 
	 *@Title: determineActivityForHierarchyRebate
	 *@Description: 根据扫码历史以及当前扫码对象判断返利活动
	 *@return DisRebateActivity
	 *@author MH
	 *@date 2017年12月6日 上午11:14:33
	 *@param dealerId
	 *@param productId
	 *@return
	 */
	RebateActivityInfo determineActivityForHierarchyRebate(Integer dealerId,Integer productId);
	
	/**
	 * 
	 *@Title: determineActivityForTerminalRebate
	 *@Description: 确定终端扫码活动
	 *@return DisRebateActivity
	 *@author MH
	 *@date 2017年12月8日 下午6:22:31
	 *@param dealerId
	 *@param productId
	 *@return
	 */
	RebateActivityInfo determineActivityForTerminalRebate(Integer dealerId,Integer productId,String openId,Integer writebackId);
	
	/**
	 * 
	 *@Title: validateActivity
	 *@Description: 校验活动是否有效
	 *@return boolean
	 *@author MH
	 *@date 2017年12月6日 下午4:21:07
	 *@param activity
	 *@return
	 */
	void validateActivity(DisRebateActivity activity);

	DisRebateActivity getActivity(RebateActivityInfo info);
}
